/**
 *
 * @param { string } string
 */
function getCountMaxString(string) {
	const obj = {}
	for (item of string) {
		if (!obj[item]) {
			obj[item] = 1
		} else {
			obj[item] += 1
		}
	}
    console.log(obj);
	let maxCount = 0
	let chat = ''
	for (item in obj) {
		if (obj[item] > maxCount) {
			maxCount = obj[item]
			chat = item
		}
	}
    console.log(chat);
    console.log(maxCount);
}
getCountMaxString('aaasssddddffffffeee')